﻿@model IEnumerable<com.qt.lib.domain.Entity.Order>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table class="default-table">
    <thead>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.OrderDateTime)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.DeliveryDateTime)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.ProductPrice)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.SalePrice)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.TotalPrice)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Staff)
        </th>
       
        <th>
            @Html.DisplayNameFor(model => model.Customer.FirstName)
        </th>
        <th></th>
    </tr>
    </thead>
    <tbody>
@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.OrderDateTime)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.DeliveryDateTime)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ProductPrice)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.SalePrice)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.TotalPrice)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Staff)
        </td>
       
        <td>
            @Html.DisplayFor(modelItem => item.Customer.FirstName)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.Id }) |
            @Html.ActionLink("Details", "Details", new { id=item.Id }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.Id })
        </td>
    </tr>
}
    </tbody>
</table>
